import React from 'react';
import { Icon } from 'antd';
import classNames from 'classnames';
import styles from './index.module.less';

const links = [{
  title: '帮助',
  href: '/help',
}, {
  title: '隐私',
  href: '/info',
}, {
  title: '条款',
  href: '/tiaokuan',
}];

const copyright = <div>Copyright <Icon type="copyright" /> 2017 芬芬出品</div>;

export default ({ className }) => {
  const clsString = classNames(styles.globalFooter, className);
  return (
    <div className={clsString}>
      {
                links && (
                <div className={styles.links}>
                  {links.map((link) => {
                            return (
                              <a
                                key={link.title}
                                target={link.blankTarget ? '_self' : '_blank'}
                                href={link.href}
                              >
                                {link.title}
                              </a>
                            );
                        })}
                </div>
                )
            }
      {copyright && <div className={styles.copyright}>{copyright}</div>}
    </div>
  );
};
